package page2;

import java.util.Scanner;

public class Ques1819 {

	public void go(){
		int[][] a = new int[35][35];
		int n,m;
		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			n = scan.nextInt();
			m = scan.nextInt();
			a[0][0] = 1;
			for(int i = 1;i<=m;i++){
				for(int j = 0;j < n;j++){
					a[i][j] = a[i - 1][(j - 1 + n)%n] + a[i - 1][(j + 1)%n];
				}
			}
			System.out.println(a[m][0]);
		}
	}
	
	public static void main(String[] args) {
		new Ques1819().go();
	}
}
